package com.mt.baseinfo.controller;

import com.mt.baseinfo.entity.EventsStatementsSummaryByDigest;
import com.mt.baseinfo.enums.DataSourceType;
import com.mt.baseinfo.mult.DataSource;
import com.mt.baseinfo.service.EventsStatementsSummaryByDigestService;
import com.mt.baseinfo.vo.DigestVo;
import com.mt.common.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/schema")
public class PerformanceSchemaController {

    @Autowired
    private EventsStatementsSummaryByDigestService digestService;

    @GetMapping("/executesMost")
    public Result executesMost(){
        List<DigestVo> result = digestService.executesMost();
        return Result.ok(result.toString());
    }
}
